Skip to content

fix(tools): make RAG file extension detection case-insensitive - #6883

Open
CountClaw wants to merge 1 commit into
crewAIInc:mainfrom
CountClaw:fix/rag-case-insensitive-extensions-6399
Open

fix(tools): make RAG file extension detection case-insensitive#6883
CountClaw wants to merge 1 commit into
crewAIInc:mainfrom
CountClaw:fix/rag-case-insensitive-extensions-6399

Conversation

@CountClaw

Copy link
Copy Markdown

What

Make RAG file extension detection case-insensitive.

Why

Supersedes Kyou12138#6755 after rebasing onto latest main (original PR branch could not be force-updated from this environment due to missing workflow OAuth scope on that account).

DataTypes.from_content() compared path.endswith(ext) against a
lowercase-only map, so .PDF/.CSV/.DOCX were misclassified as text
(or website for URLs). Lowercase the path before matching.

Closes crewAIInc#6399
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d6312d1-12d4-430d-95cd-d9274c9e3d6a

📥 Commits

Reviewing files that changed from the base of the PR and between f7ba8e3 and 3e2a802.

📒 Files selected for processing (2)
  • lib/crewai-tools/src/crewai_tools/rag/data_types.py
  • lib/crewai-tools/tests/tools/rag/test_data_types_from_content.py

📝 Walkthrough

Walkthrough

Changes

RAG file type detection

Layer / File(s) Summary
Case-insensitive extension matching
lib/crewai-tools/src/crewai_tools/rag/data_types.py, lib/crewai-tools/tests/tools/rag/test_data_types_from_content.py
get_file_type lowercases paths before matching extensions. Tests cover mixed-case local paths, URLs, Path objects, and website fallbacks.

Suggested reviewers: greysonlalonde

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the case-insensitive RAG file extension detection change.
Description check ✅ Passed The description explains the change and its purpose, and it matches the pull request changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants